def md5(user):
    """
    用于生成token
    INPUT: username, time
    output: token
    """
    import hashlib
    import time

    ctime = str(time.time())

    m = hashlib.md5(bytes(user,encoding='utf-8'))
    m.update(bytes(ctime,encoding='utf-8'))

    return m.hexdigest()
